package com.sinosoft.dsp.test;

import org.primefaces.model.chart.PieChartModel;

import com.sinosoft.dsp.platform.components.system.ModuleBean;
import com.sinosoft.dsp.system.core.exception.SinoException;
import com.sinosoft.dsp.system.to.IGenericTO;

public class PiceModuleViewBean extends ModuleBean {

	private static final long serialVersionUID = -2643427592533625927L;

	private PieChartModel pieModel;

	@Override
	public void construct(String sceneId, String layout) throws SinoException {
		// TODO Auto-generated method stub
		super.construct(sceneId, layout);
	}

	@Override
	public void init(IGenericTO tos) throws SinoException {
		// TODO Auto-generated method stub
		super.init(tos);
		createPieModel();
	}

	public PieChartModel getPieModel() {
		return pieModel;
	}

	private void createPieModel() {
		pieModel = new PieChartModel();

		pieModel.set("刑事案件", 540);
		pieModel.set("治安案件", 325);
		pieModel.set("治安调解", 702);
		pieModel.set("经济案件", 421);
	}

}
